package com.example.zce.library.data.sys.model;

import com.example.zce.library.data.sys.entity.BackRole;
import com.example.zce.library.data.sys.entity.BackUser;

import java.util.Date;

/**
 * 描述：
 *
 * @author zengyz
 * @date 2018/7/29 17:18
 */
public class BackUserModel {

    private String id;
    private String account;
    private String password;
    private String remark;
    private Integer state;
    private Date createTime;

    private String roleId;
    private String name;
    private String code;

    public static BackUserModel init(BackUser backUser, BackRole backRole){
        BackUserModel backUserModel=new BackUserModel();
        backUserModel.setId(backUser.getId());
        backUserModel.setAccount(backUser.getAccount());
        backUserModel.setPassword(backUser.getPassword());
        backUserModel.setState(backUser.getState());
        backUserModel.setCreateTime(backRole.getCreateTime());
        backUserModel.setRemark(backUser.getRemark());
        backUserModel.setRoleId(backRole.getId());
        backUserModel.setName(backRole.getName());
        backUserModel.setCode(backRole.getCode());
        return backUserModel;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
